﻿using ATS.Core.Authorization;

namespace ATS.Plugins.Template;

internal class Permissions
{
    public static readonly Permissions Default = new();

    private Permissions() { }

    public string MenuPlugins => "Menu.Plugins";
    public string MenuPluginsTemplate => "Menu.Plugins.Template";
    public string MenuPluginsSetting => "Menu.Plugins.Setting";

    public static void Create(IPermissionCatalog permissionCatalog)
    {
        permissionCatalog
            .Add(Default.MenuPlugins, "【导航菜单】插件系统")
            .Add(Default.MenuPluginsTemplate, "【导航菜单】插件系统->模板插件")
            .Add(Default.MenuPluginsSetting, "【模板插件】允许在选项中修改此插件的配置")
            ;
    }
}